package com.scpii.universal.pns.service;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.scpii.universal.constant.GenericConstants;
import com.scpii.universal.pns.dao.DevicesDao;
import com.scpii.universal.pns.entity.Devices;

@Service
public class DevicesServiceImpl extends PnsBaseServiceImpl<Devices, Long>
		implements DevicesService {

	@Resource
	private DevicesDao devicesDao;

	@Override
	public String[] getDevicesModelsByAppId(Integer appId) {
		return devicesDao.getDevicesModels(GenericConstants.APP_ID_PRE + appId);
	}

	@Override
	public List<String> getSysVersionsByModel(String deviceModel) {
		return devicesDao.getSysVersionsByModel(deviceModel);
	}

	@Override
	public List<Map<String, Object>> getDevicesModelsByType(String deviceType) {
		return devicesDao.getDevicesModelsByType(deviceType);
	}

}
